﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Entity
{
    public class User
    {
        #region[Public Properties]

        public string Id { get; set; }
        public string Name { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public string Level { get; set; }
        public string Admin { get; set; }
        public string Ord { get; set; }
        public string Active { get; set; }

        #endregion
        #region[UserIDataReader]
        public static User UserIDataReader(IDataReader dr)
        {
            var obj = new User
                          {
                              Id = Convert.ToString(dr["Id"]),
                              Name = Convert.ToString(dr["Name"]),
                              Username = Convert.ToString(dr["Username"]),
                              Password = Convert.ToString(dr["Password"]),
                              Level = Convert.ToString(dr["Level"]),
                              Admin = Convert.ToString(dr["Admin"]),
                              Ord = Convert.ToString(dr["Ord"]),
                              Active = Convert.ToString(dr["Active"])
                          };
            return obj;
        }
        #endregion
    }
}
